import request from '../req'
import type { MapDataDto } from './types'
// 大屏获取部门信息
export const getBiDeptInfoApi = async (params: any) => {
    const res = await request.get('/crm/bi/dept-info', { params: params })
    return res
}

// 大屏获取地图信息
export const getBiMapDataApi = (): Promise<MapDataDto[]> => {
    return request.get('/crm/bi/map-data')
}

// 获取头部业绩接口
export const getBiQuerySalesVolumeApi = async (params: any) => {
    const res = await request.get('/crm/bi/query-sales-volume', { params: params })
    return res
}

// 获取头部业绩接口
export const getBiquerySalesVolumeGroupApi = async (params: any, config = {
    noLoading: true
}) => {
    const res = await request.get('/crm/bi/query-sales-volume-group', { params: params, ...config })
    return res
}

// 获取头部业绩接口
export const getBiSalesRankingApi = async (params: any, config = {
    noLoading: true
}) => {
    const res = await request.get('/crm/bi/sales-ranking', { params: params, ...config })
    return res
}

// 获取保司信息
export const getBiInsuranceDataApi = async (params?: any, config = {
    noLoading: true
}) => {
    const res = await request.get('/crm/bi/insurance-data', { params: params, ...config })
    return res
}

// crm大屏保险数据
export const getBiinsureDataByInsuranceApi = async (params?: any, config = {
    noLoading: true
}) => {
    const res = await request.get('/crm/bi/insure-data-by-insurance', { params: params, ...config })
    return res
}